#!/bin/bash
readonly FNAME='/proc/cpuinfo'
[[ -r "$FNAME" ]] || exit 0
i=0
for FREQ in $(cat "$FNAME" | awk -- '$1 ~ /cpu/ && $2 ~ /MHz/ {print $4}'); do
	echo "generic,g,cpu$i,$1,$FREQ"
	(( i += 1 )) || true
done
